@import './const.scss';

.gray-scroll-bar() {
  &::-webkit-scrollbar {
    width: 6px; /*对垂直流动条有效*/
    height: 6px; /*对水平流动条有效*/
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #dcdcdc;
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
  }
}

.new-scroll-bar {
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: #2c869b;
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
  }
}

.opacity-scroll-bar {
  &::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
  }
}

// 超出字体隐藏
.text-overflow() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.clear-fix {
  &:after {
    content: ' ';
    visibility: hidden;
    display: block;
    height: 0;
    clear: both;
  }
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.border-bottom-1px {
  position: relative;

  &:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: $border-gray;
  }
}

.border-top-1px {
  position: relative;

  &:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background-color: $border-gray;
  }
}

.border-bottom-1px {
  position: relative;

  &:before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: $border-gray;
  }
}

.a-picture-scroll-bar {
  &::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(87, 150, 149, 0.5);
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
  }
}
.a-picture-scroll-bar-none {
  &::-webkit-scrollbar {
    width: 0px;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    border-radius: 0px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 0px;
  }
}

.lzz-scroll-bar {
  &::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgb(37, 178, 162);
    border-radius: 3px;
  }

  &::-webkit-scrollbar-track {
    border-radius: 6px;
  }
}

// 弹性布局 占绝对位置不被挤
.flex-grow-0() {
  min-width: 0;
  -webkit-box-flex: 0;
  -webkit-flex-grow: 0;
  -ms-flex-positive: 0;
  flex-grow: 0;
  -webkit-flex-shrink: 0;
  -ms-flex-negative: 0;
  flex-shrink: 0;
}
// 弹性布局 占剩余位置
.flex-grow-1() {
  min-width: 0;
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  -webkit-flex-shrink: 1;
  -ms-flex-negative: 1;
  flex-shrink: 1;
}
